package com.mvc.framework.model;

import javax.persistence.Entity;
import javax.validation.constraints.NotNull;
/**
 * Base Tree
 */
@Entity(name="F_TREE")
public class Tree extends CommonAuditableEntity implements BaseTree{
	public static final int IS_LEAF = 1;
	public static final int IS_NOT_LEAF = 2;
	public static final int DEFAULT_DEEP_LEVEL = 0;
	public static final int DEFAULT_DEEP_LEVEL_STEP = 1;
	public static final int DEFAULT_ORDER_ID = 1;
	public static final Tree ROOT= new Tree();
	static {
		ROOT.setObjectId(BaseTree.ROOT);
		ROOT.setName("ROOT");
	}
	@NotNull
	private Integer parentId;
	@NotNull
	private String name;
	@NotNull
	private String codeNo;
	@NotNull
	private Integer levelDeep;
	@NotNull
	private Integer isLeaf;
	@NotNull
	private Integer orderId;
	@NotNull
	private Integer status;
	private Integer property;
	private String description;
	public Integer getParentId() {
		return parentId;
	}
	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getProperty() {
		return property;
	}
	public void setProperty(Integer property) {
		this.property = property;
	}
	public Integer getLevelDeep() {
		return levelDeep;
	}
	public void setLevelDeep(Integer levelDeep) {
		this.levelDeep = levelDeep;
	}
	public Integer getIsLeaf() {
		return isLeaf;
	}
	public void setIsLeaf(Integer isLeaf) {
		this.isLeaf = isLeaf;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getCodeNo() {
		return codeNo;
	}
	public void setCodeNo(String codeNo) {
		this.codeNo = codeNo;
	}
	public Integer getOrderId() {
		return orderId;
	}
	public void setOrderId(Integer orderId) {
		this.orderId = orderId;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
}
